package com.cskaoyan.bean.vo;

import com.cskaoyan.bean.pojo.MarketGoods;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 商品管理-获取商品列表
 * 创建日期: 2022/04/07 22:07
 *
 * @author HanWeiqi
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class GoodsListVO {
    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<MarketGoods> list;

    public static GoodsListVO data(long total,Integer pages,Integer limit,Integer page,List list) {
        GoodsListVO goodsListVO = new GoodsListVO();
        goodsListVO.setTotal((int) total);
        goodsListVO.setPages(pages);
        goodsListVO.setPage(page);
        goodsListVO.setLimit(limit);
        goodsListVO.setList(list);
        return goodsListVO;
    }
}
